package com.atguigu.listener;


import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.annotation.WebListener;

@WebListener
public class MyApplicationListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("监听到了应用域创建");
    }


    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("监听到了应用域销毁");
    }
}
